@use '../core' as *;

.iconList {
    display: flex;
    flex-wrap: wrap;
    height: 34rem;
    overflow-y: scroll;
    border: 1px solid var(--color-border-primary);
    border-bottom: none;
    box-shadow: inset 0 -1px 0 0 var(--color-border-primary);
    container-type: size;
}

.iconItem {
    $container-small: 640px;
    $container-large: 820px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: $spacing-size-1;
    width: 50%;
    padding: $spacing-size-4 $spacing-size-2;
    border-bottom: 1px solid var(--color-border-primary);

    @container (max-width: #{$container-small}) {
        &:not(:nth-child(2n)) {
            border-right: 1px solid var(--color-border-primary);
        }
    }

    @container (min-width: #{$container-small}) and (max-width: #{$container-large}) {
        width: 33.3333%;

        &:not(:nth-child(3n)) {
            border-right: 1px solid var(--color-border-primary);
        }
    }

    @container (min-width: #{$container-large}) {
        width: 25%;

        &:not(:nth-child(4n)) {
            border-right: 1px solid var(--color-border-primary);
        }
    }

    img {
        display: block;
        height: 32px;

        #{$selector-darkmode} & {
            filter: invert(1);
        }
    }

    p.iconName {
        margin-bottom: 0;
        text-align: center;
    }
}

.footer {
    display: flex;
    justify-content: flex-end;
    margin-top: $spacing-size-4;
}

.downloadButton {
    padding-right: 0.5em;

    svg {
        --icon-size: 1.5em !important;
    }
}
